The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
A solid state drive (SSD), which may also be referred to as a solid state disk, is a storage device that stores data using volatile or non-volatile solid-state memory. Solid-state memory is composed of electronic components that are based on semiconductors. Solid state drives may include different types of memory elements including, but not limited to, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Parameter Random Access Memory (PRAM), FLASH memory (e.g., NOR FLASH memory, and NAND FLASH memory), or Phase Change Memory (PCM).
Since SSDs do not have any moving parts, SSDs offer significantly reduced risk of mechanical failures. Fewer mechanical failures results in improved system reliability. Furthermore, due to the lack of moving parts, SSDs provide lower read and write seek times as compared to standard rotating-medium hard-drives. Accordingly SSDs allow for higher sequential and random data read and write rates.
Although there are no moving parts on an SSD, there are nonetheless performance issues as a result of device limitations and possibly free space fragments. For example, a performance-based limitation may be the limited number of write operations a SSD can perform in any given time period. When a SSD is writing to a multitude of small free space fragments, a file must be fragmented into many different pieces for storage onto the SSD. As writing to each free space fragment may require an erase operation and requires a write operation and the number of write operations a SSD can perform can be limited, a multitude of small free space fragments may result in a failure to utilize the maximum sequential write speed of the SSD due to the limited number of write operations.
In normal computer usage, modern operating systems such as Windows™ (Windows™ is a trademark of the Microsoft Corporation, Seattle, Wash.) create a multitude of free space fragments. For example, browsing the Internet could potentially create lots of unwanted free-space fragments. The web browser creates many temporary files as it is used. Most of the temporary files are small and have a short life time and are deleted frequently, e.g., during browser cache cleanup, etc. However, all the temporary files are not deleted at the same time or in the order in which they were created. This phenomenon accelerates the creation of the free-space fragments.
Furthermore, when a newly-created file is being stored to disk, file systems generally begin writing the newly-created file into either (a) the most recently freed free-space fragment or (b) the first-identified free-space fragment without considering the size of the free space fragment. If the file to be written is large and the identified free-space fragments are small, the file is split into many fragments corresponding to the identified free-space fragments and multiple write operations are required to store the file to the disk. In addition to the write operations required to store the actual file, multiple write operations may also be required to update the file system structures when the file is stored in multiple fragments.